package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

/**
 * Created by Administrator on 2017/12/30 0030.
 */
@Entity
@Table(name = "T_SYS_GROUP", schema = "oa", catalog = "")
public class GroupEntity extends BaseEntity {
    private String id;
    private String groupName;
    private String parentId;
    private String sortNo;
    private String createUserId;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getSortNo() {
        return sortNo;
    }

    public void setSortNo(String sortNo) {
        this.sortNo = sortNo;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID",this.getId());
        json.put("GROUP_NAME",this.getGroupName());
        json.put("SORT_NO",this.getSortNo());
        json.put("PARENT_ID",this.getParentId());
        json.put("CREATE_USER_ID",this.getCreateUserId());
        json.put("CREATE_TIME",this.getCreateTime());

        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_GROUP";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID","id");
        json.put("GROUP_NAME","groupName");
        json.put("SORT_NO","sortNo");
        json.put("PARENT_ID","parentId");
        json.put("CREATE_USER_ID","createUserId");
        json.put("CREATE_TIME","createTime");
        return json;
    }

}
